package money

// type Dollor struct {
// 	Money
// }

// func (d *Dollor) Times(multiplier int) *Dollor {
// 	return NewDollor(d.amount * multiplier)
// }

// type Franc struct {
// 	Money
// }

// func (f *Franc) Times(multiplier int) *Franc {
// 	result := NewFranc(f.amount * multiplier)
// 	return result
// }

type Money struct {
	amount   int
	currency string
}

func (m Money) Times(multiplier int) Money {
	return Money{m.amount * multiplier, m.currency}
}

func (m Money) Plus(addend Money) Money {
	return Money{amount: m.amount + addend.amount, currency: m.currency}
}

func CreateMoney(amount int, currency string) Money {
	return Money{amount: amount, currency: currency}
}

func CreateFranc(amount int) Money {
	return Money{amount: amount, currency: "FRANC"}
}

func CreateDollor(amount int) Money {
	return Money{amount: amount, currency: "USD"}
}

// func CreateFranc(amount int) Franc {
// 	return Franc{Money: Money{amount: amount}}
// }

// func CreateDollor(amount int) Dollor {
// 	return Dollor{Money: Money{amount: amount}}
// }

type Bank struct {
}

func (b Bank) Reduce(m Money, currency string) Money {
	return CreateDollor(10)
}

type Sum struct {
}
